<template>
    
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">

        <#--<#list originalColumns as po><#rt/>
          <#if po.uiForm ='true'><#rt/>
            <a-form-item
                    :labelCol="labelCol"
                    :wrapperCol="wrapperCol"
                    label="${po.uiFieldcomment}">
                <#if po.uiUitype =='2'>
                    <a-date-picker style="width: 100%" showTime <#if po.uiOnlyread =='true'> disabled </#if>  format='YYYY-MM-DD HH:mm:ss' v-decorator="[ '${po.fieldName}', <#if po.uiNotnull =='true'||po.uiDefaultvalue !=''>validatorRules.${po.fieldName} <#else>{}</#if>]" />
                <#elseif po.uiUitype =='1'>
                    <j-dict-select-tag :triggerChange="true" <#if po.uiOnlyread =='true'> disabled </#if> dictCode="${po.uiSelectfunc}" v-decorator="[ '${po.fieldName}', <#if po.uiNotnull =='true'||po.uiDefaultvalue !=''>validatorRules.${po.fieldName} <#else>{}</#if>]">
                    </j-dict-select-tag>
                <#elseif po.uiUitype =='4'>
                    <a-input-number style="width: 100%" <#if po.uiOnlyread =='true'> disabled </#if> v-decorator="[ '${po.fieldName}', <#if po.uiNotnull =='true'||po.uiDefaultvalue !=''>validatorRules.${po.fieldName} <#else>{}</#if>]" />
                <#elseif po.uiUitype =='5'>
                    <a-textarea <#if po.uiOnlyread =='true'> disabled </#if> v-decorator="[ '${po.fieldName}', <#if po.uiNotnull =='true'||po.uiDefaultvalue !=''>validatorRules.${po.fieldName} <#else>{}</#if>]" :autoSize="{ minRows: 2, maxRows: 4 }"/>
                <#else>
                    <a-input <#if po.uiOnlyread =='true'> disabled </#if>  v-decorator="['${po.fieldName}', <#if po.uiNotnull =='true'||po.uiDefaultvalue !=''>validatorRules.${po.fieldName} <#else>{}</#if>]" />
                </#if>
            </a-form-item>
          </#if>
        </#list>-->

          <#assign x=0 />
            <#list formList as po> <#rt/>
            <#if x%viewModule.viewMaincols?number =0>
          <a-row></#if>
              <#assign x=x+1 />
            <a-col :span="${24/viewModule.viewMaincols?number}">
              <a-form-item
                  :labelCol="labelCol"
                  :wrapperCol="wrapperCol"
                  label="${po.uiFieldcomment}">
                  <#if po.uiUitype =='2'>
                      <a-date-picker style="width: 100%"  <#if po.uiOnlyread =='true'> disabled </#if>  format='YYYY-MM-DD' v-decorator="[ '${po.fieldName}', <#if po.uiNotnull =='true'||(po.uiDefaultvalue !=''&&po.uiDefaultvalue !='#date'&&po.uiDefaultvalue !='#user'&&po.uiDefaultvalue !='#orgCode')>validatorRules.${po.fieldName} <#else>{}</#if>]" />
                  <#elseif po.uiUitype =='7'>
                      <a-date-picker style="width: 100%" showTime <#if po.uiOnlyread =='true'> disabled </#if>  format='YYYY-MM-DD HH:mm:ss' v-decorator="[ '${po.fieldName}', <#if po.uiNotnull =='true'||(po.uiDefaultvalue !=''&&po.uiDefaultvalue !='#date'&&po.uiDefaultvalue !='#user'&&po.uiDefaultvalue !='#orgCode')>validatorRules.${po.fieldName} <#else>{}</#if>]" />
                  <#elseif po.uiUitype =='1' || po.uiUitype =='6'>
                      <j-dict-select-tag :triggerChange="true" <#if po.uiOnlyread =='true'> disabled </#if> dictCode="${po.uiSelectfunc}" v-decorator="[ '${po.fieldName}', <#if po.uiNotnull =='true'||po.uiDefaultvalue !=''>validatorRules.${po.fieldName} <#else>{}</#if>]">
                      </j-dict-select-tag>
                  <#elseif po.uiUitype =='4'>
                      <a-input-number style="width: 100%" <#if po.uiOnlyread =='true'> disabled </#if> v-decorator="[ '${po.fieldName}', <#if po.uiNotnull =='true'||po.uiDefaultvalue !=''>validatorRules.${po.fieldName} <#else>{}</#if>]" />
                  <#elseif po.uiUitype =='5'>
                      <a-textarea <#if po.uiOnlyread =='true'> disabled </#if> v-decorator="[ '${po.fieldName}', <#if po.uiNotnull =='true'||po.uiDefaultvalue !=''>validatorRules.${po.fieldName} <#else>{}</#if>]" :autoSize="{ minRows: 2, maxRows: 4 }"/>
                  <#else>
                      <a-input <#if po.uiOnlyread =='true'> disabled </#if>  v-decorator="['${po.fieldName}', <#if po.uiNotnull =='true'||po.uiDefaultvalue !=''>validatorRules.${po.fieldName} <#else>{}</#if>]" />
                  </#if>
              </a-form-item>
           </a-col>
         <#if x%viewModule.viewMaincols?number =0 ></a-row></#if>
          </#list> 
         <#if formList?size % viewModule.viewMaincols?number !=0 ></a-row></#if>


      </a-form>
    </a-spin>
</template>

<script>

  export default {
    data () {
      return {
        title:"操作",
        visible: false,
        model: {},
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },

        confirmLoading: false,
        form: this.$form.createForm(this),
        validatorRules:{
      <#list originalColumns as po>
      <#if po.uiForm =='true'>
      <#if po.uiNotnull =='true'||(po.uiDefaultvalue !=''&&po.uiDefaultvalue !='#date'&&po.uiDefaultvalue !='#user'&&po.uiDefaultvalue !='#orgCode')>
      ${po.fieldName}:{<#if po.uiNotnull =='true'> rules: [{ required: true, message: '请输入${po.uiFieldcomment}!' ,<#if po.uiExpression !=''>pattern:${po.uiExpression} </#if>}],</#if>
              <#if  po.uiDefaultvalue !=''&&po.uiDefaultvalue !='#date'&&po.uiDefaultvalue !='#user'&&po.uiDefaultvalue !='#orgCode'>initialValue: '${po.uiDefaultvalue}'</#if>},
      </#if>
      </#if>
      </#list>
    },
      }
    },
    created () {
    },
    methods: {



    }
  }
</script>

<style lang="less" scoped>

</style>